package cn.hh.ymcc.service;

import cn.hh.ymcc.domain.CourseOrder;
import cn.hh.ymcc.domain.PayFlow;
import cn.hh.ymcc.domain.PayOrder;
import cn.hh.ymcc.dto.Order2payOrderParamDto;
import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author huang.hao
 * @since 2025-05-12
 */
public interface IPayOrderService extends IService<PayOrder> {


    /**
     *  消费消息, 保存支付单
     * @param orderDto
     */
    void savePayOrder(Order2payOrderParamDto orderDto);

    /**
     *  修改支付单状态&保存支付流水
     * @param payOrder
     * @param payFlow
     */
    void updatePayOrderAndInsertPayFlow(PayOrder payOrder, PayFlow payFlow);

    /**
     *  取消支付单并关闭支付宝交易
     * @param orderNo
     */
    void payTimeOutCancelOrder(String orderNo);


    /**
     *  根据订单号查询订单
     * @param orderNo
     * @return
     */
//    CourseOrder selectByOrderNo(String orderNo);
}
